package com.shen.server.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shen.server.pojo.Employee;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author HMF
 * @since 2022-04-10
 */
public interface EmployeeMapper extends BaseMapper<Employee> {

    /**
     * 获取所有员工
    * @date: 2022/4/20
    * @param: page
    * @param: employee
    * @param: beginDateScope
    * @return
    */

    IPage<Employee> getEmployeeByPage(Page<Employee> page, @Param ("employee") Employee employee, @Param ("beginDateScope") LocalDate[] beginDateScope);

    /**
     * 查询员工（id为null）时查所有
     * @date: 2022/4/22
     * @param: id
     * @return
     */
    List<Employee> getEmployees(Integer id);

    /**
     * 获取所以员工账套(分页)
     * @date: 2022/4/24
     * @param: currenPage
     * @param: size
     * @return
     */
    IPage<Employee> getEmplWithSlary(@Param ("page") Page<Employee> page, @Param ("employee") Employee employee);
}
